<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/WorkspaceTemplate.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="top">
        
    </ui:define>

    <ui:define name="left">
       
    </ui:define>

    <ui:define name="right">
       
    </ui:define>

    <ui:define name="content">
        <h:form>
            <p:dataTable value="#{annouceManagerBean.myAnnouncements}" var="ann"
                         style="width: 100%"
                         paginator="true" rows="15"  
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                         rowsPerPageTemplate="15,20,25"
                         widgetVar="vrs">

                <f:facet name="header">
                    View My Announcements
                </f:facet>

                <p:column headerText="Title"
                          filterBy="#{ann.title}">
                    <p:commandLink value="#{ann.title}" ajax="false" action="#{annouceManagerBean.viewOneMyAnn(ann.id)}"/>
                </p:column>

                <p:column headerText="Posted On"
                          sortBy="#{ann.formattedDate}">
                    <h:outputText value="#{ann.formattedDate}"/>
                </p:column>

                <p:column headerText="Posted By">
                    <h:outputText value="#{annouceManagerBean.getPosterFullName(ann.posterId)}"/>
                </p:column>
            </p:dataTable>
            <p:ajaxStatus style="width: 16px;height: 16px;">
                <f:facet name="start">
                    <h:graphicImage value="./../images/ajaxloading.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value=""/>
                </f:facet>
            </p:ajaxStatus>
        </h:form>
    </ui:define>

    <ui:define name="bottom">
       
    </ui:define>

</ui:composition>
